import { http } from "@/utils/http.js";

//视频分类
export const videoCate = (data) => {
  return http.request({
    method: "get",
    url: "/video/cate",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

//视频列表
export const videoLst = (data) => {
  return http.request({
    method: "get",
    url: "/video/lst",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

// 视频详情
export const videoDetails = (data) => {
  return http.request({
    method: "get",
    url: `/video/details/${data.id}`,
    params: {
      //...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

//视频点赞
export const videoLike = (data) => {
  return http.request({
    method: "POST",
    url: "/video/like",
    data: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};
